package com.hex.ds.hdtp.core.web.data.transfer.vo;

import cn.hutool.core.collection.CollectionUtil;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @Package: com.hex.ds.hdtp.core.web.data.transfer.vo
 * @ClassName DataTransferTaskVo
 * @Description: 数据迁移任务-Vo对象
 * @Author: wz.li
 * @Date 2023/8/17 20:30
 * @Version v2.0.2
 **/
@Data
public class DataTransferTaskVo implements Serializable {

    private String pkId;

    private String taskName;

    private String dataSyncType;

    private String dataSyncStartTime;

    private String dataSyncEndTime;

    private String status;

    private Integer total;

    private Integer successCount;

    private Integer failCount;

    private String isDataAnalysis;

    private String startTime;

    private String endTime;

    private List<DataTransferListVo> tableList;

    private String dataTransferType;

    private String transferType;

    public Integer getTotal() {
        if (CollectionUtil.isNotEmpty(tableList)){
            return tableList.size();
        }
        return total;
    }
}
